package com.geek.aidy.geek;

public class Test {
    
    private static final int MAX_LENGTH = 8;


    public static void main(String[] args) {
        System.out.println("开始");
        System.out.println(System.getProperty("java.io.tmpdir"));
        
        String formString = String.format("%0" + MAX_LENGTH + "d", 1, 2);;
        System.out.println(formString);


    }

    public static String extractNameValue(String jsonArrayStr) {
        JSONArray array = JSON.parseArray(jsonArrayStr);
        for (int i = 0; i < array.size(); i++) {
            JSONObject item = array.getJSONObject(i);
            if ("姓名".equals(item.getString("key"))) {
                JSONArray values = item.getJSONArray("value");
                if (values != null && !values.isEmpty()) {
                    return values.getJSONObject(0).getString("value");
                }
            }
        }
        return null;
    }
}
